# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pycryptodomex
_pkgname=pycryptodomex
pkgver=3.9.9
pkgrel=2
pkgdesc='A self-contained Python package of low-level cryptographic primitives'
url='http://www.pycryptodome.org/'
arch=('x86_64' 'aarch64')
license=('BSD')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('68a59cd537c1745db0082979716f0ba0508bb9d82d7129d42931056b5927f27ada1b92f88cc7c4d3954a02cd724a88c0e60fa38a5d8d7c73baa6541d332ff8a9')

build() {
	cd "$_pkgname-$pkgver"

	python2 setup.py build
}

package() {
	cd "$_pkgname-$pkgver"

	python2 setup.py install --root="$pkgdir" -O1 --skip-build

	install -Dm 644 LICENSE.rst "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

